function journey_cost(journey){
    let result;
    if(journey<=2){
        result=6;
    }
    if(journey>2&&journey<=8){
        result=6+(journey-2)*0.8;
    }
    if(journey>8){
        result=6+(8-2)*0.8+(journey-8)*0.8*1.5;
    }
    return result;
}
function time_cost(time){
    return time*0.25;
}
function main(journey,time){
    console.log(Math.round(journey_cost(journey)+time_cost(time)));
    return Math.round(journey_cost(journey)+time_cost(time));
}
module.exports = main;
main(3,0);